// dlg.txt

//	mark_quest_dest(zone,x,y,layer,quest);
//	cancel_out_fight(0,short kill_enc)
//	make_outdoor_enc(short x,short y,short which_enc);
//	set_out_fight_field(short which_field);

begintalkscript;

variables;

short this_sec = 52;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The huge rootling had something hanging from one of its upper branches. Looks like leather. You pull it out of the wreckage. It's a nice leather tunic.";
	code =
		reward_give(197);
	break;
	
	
	
begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You come across a small clan of the Kranas, walking down the gravel road. They are wearing the standard leather garb and are lightly armed. They are healthy folk, mostly adults with a few children. They are all crying.";
	text2 = "Normally, the Rokaj are happy to meet Havenites (or pretend to be so.) This clan is very unhappy to see you.";
	code =
		cancel_out_fight(0,1);
	break;
	
begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Stop them.";
	text1 = "You block their path. The patriarch of the clan walks forward to meet you. He looks miserable, though, if he is angry, he hides it well.";
	text2 = "_Greetings, Haven. What do you want?_";

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Let them pass.";
	text1 = "You each carefully take up half of the path and pass each other. They leave the area quickly.";
	action = END_TALK;

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Where are you coming from?_";
	text1 = "_We come from Deepgrove, to the north. It is an angry place, but it accepted us._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Why did you come out here?_";
	text1 = "_It is a journey of ... tradition. Sometimes, our clans must come to the groves. It is the Kranas way. Your governors have always left us to it._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Why are you crying?_";
	text1 = "Now you can see his anger. He starts to snap a response. His wife rushes forward and rests her hand on his arm. He calms down but does not respond.";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_I need all of your names._";
	text1 = "Quietly, furiously, each of the clan gives you a name. You don't know what use the information is. They're just walking here. But it's good to keep them in their place.";
	code =
		ro_faction(-2);
		violence(1);
	break;

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_You may go._";
	text1 = "They quietly pass you on the path.";
	action = END_TALK;
	
	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "This land is claimed by a small clan. They seem to be making a good living with a combination of farming and mining. You can see workers going into a shaft in the cliff wall to the north.";
	text2 = "These Kranas are nervous and armed, but your presence reassures them. A nice change. They wave when they see you.";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "Approach the farm.";
	text1 = "The clan greets you. They are really happy to see armed Havenites out here. They offer you drinks and a meal and trade news of recent events.";
	text2 = "_Be wary traveling this area, Haven. There is danger._";
	code =
		if (gf(19,11) > 0)
			rs(2);
	break;
	
begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Leave.";
	text1 = "You wave back and depart. They resume patrolling their land, looking for hostile intruders.";
	action = END_TALK;

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "Accept their hospitality.";
	text1 = "They welcome you in and serve roast elk and some sort of lightly fermented, thick, milky beverage. Their children sing a few local folk songs. It's sort of nice.";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "Try to shop.";
	text1 = "You are not successful. It's a humble farm, and you don't really need elk jerky or ten tons of iron ore.";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = gf(19,11) == 0;
	question = "_What is the danger?_";
	text1 = "_Deepgrove is to the west. It is a sacred place. Once, it protected you. Now, it lashes us with its anger. Stay on the path if you would stay safe._";
	text2 = "_If you want to learn more, the Raasa in Ssilyn is looking for help._";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = gf(19,11) > 0 && gf(19,12) == 0 && gf(152,9) == 0;
	question = "_I have returned peace to the nearby grove._";
	text1 = "_We already felt the change. We did not know that Haven gave us this gift. Let us show our humble thanks. We have something we found in our mine._";
	text2 = "You are brought a crystal. It is very nice.";
	code =
		sf(152,9,1);
				change_crafting(1,0,0,0,0);
	break;
	
begintalknode;
	state = 41;
	nextstate = -1;
	condition = gf(19,21) > 0 && gf(152,9) == 0;
	question = "_I have purged the nearby grove of evil._";
	text1 = "_Yes. You purged our sacred grove with fire. Now it will never hurt anyone. Or help them. You are very kind, Haven._";
	code =
		sf(152,9,1);
	break;

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "Depart.";
	text1 = "You bid the clan farewell. They wave as you go. Except for the occasional strained silence, they really seemed like they liked you.";
	action = END_TALK;


	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				